import request from "../../common/request";

//
export function taskList(data) {
    return request.request({
      url: `/vehicle/newWorkOrder`,
      method: "post",
      data: data,
    });
  }
  // 车辆报停
  export function saveCar(data) {
    return request.request({
      url: `/vehicle/carStop`,
      method: "post",
      data: data,
    });
  }
// 查看工单-
export function lookOrd(data) {
  return request.request({
    url: `/vehicle/newOrderDetail`,
    method: "get",
    data: data,
  });
}
// 接单-
export function taking(data) {
  return request.request({
    url: `/vehicle/orderTaking?id=${data.id}`,
    method: "post",
    data: data,
  });
}
//发送重置密码邮件
export function sendEmail(data) {
  return request.request({
    url: `/email/reset-pw?email=${data}`,
    method: "get",
    data: data,
  });
}
// 校验验证码

export function ruleEmail(data) {
  return request.request({
    url: `/email/verify?email=${data.email}&code=${data.code}`,
    method: "get",
    data: data,
  });
}
//到达收运点填报信息 /vehicle/informationFilling
export function fillSave(data) {
  return request.request({
    url: `/vehicle/informationFilling`,
    method: "post",
    data: data,
  });
}
//收运点下拉 /vehicle/takedWorkOrderAll
export function farmLists(data) {
  return request.request({
    url: `/vehicle/takedWorkOrderAll`,
    method: "post",
    data: data,
  });
}
// 修改昵称 /system/user/profile
export function changeNickname(data) {
  return request.request({
    url: `/system/user/profile`,
    method: "put",
    data: data,
  });
}
//取消车辆报停 /vehicle/cancelCarStop
export function cancelStop(data) {
  return request.request({
    url: `/vehicle/delCancelCarStop`,
    method: "post",
    data: data,
  });
}
//工单取消车辆报停 /vehicle/cancelCarStop
export function cancelStops(data) {
  return request.request({
    url: `/vehicle/cancelCarStop`,
    method: "post",
    data: data,
  });
}
//查看车辆报停 /vehicle/showCancelCarStop
export function showCarStop(data) {
  return request.request({
    url: `/vehicle/showCancelCarStop`,
    method: "post",
    data: data,
  });
}
//出厂填报
export function fillInLeaveWeight(data) {
  return request.request({
    url: `/vehicle/fillInLeaveWeight`,
    method: "post",
    data: data,
  });
}
//加油记录 //refuel-record/list
export function refuelList(data) {
  return request.request({
    url: `/refuel-record/list`,
    method: "get",
    data: data,
  });
}
//卡片
export function refuelCard(data) {
  return request.request({
    url: `/refuel-record/card/${data}`,
    method: "get",
    data: data,
  });
}
//新增加油记录 /refuel-record/add
export function refuelAdd(data) {
  return request.request({
    url: `/refuel-record/add`,
    method: "post",
    data: data,
  });
}
//删除 /refuel-record/delete
export function refuelDel(data) {
  return request.request({
    url: `/refuel-record/delete`,
    method: "post",
    data: data,
  });
}
//编辑
export function refuelEdit(data) {
  return request.request({
    url: `/refuel-record/update`,
    method: "post",
    data: data,
  });
}
//年度报告列表 /annual-report/years
export function annualList(data) {
  return request.request({
    url: `/annual-report/years`,
    method: "get",
    data: data,
  });
}
//修改密码 /driver/reset-pwd
export function resetPwd(data) {
  return request.request({
    url: `/${data.role}/reset-pwd`,
    method: "post",
    data: data,
  });
}